import request from '@/utils/request'

/**
 * @description 客服列表
 * @param
 * @returns
 */
export async function chatIndex(data) {
	return request({
		url: '/supplier/chat.chat/index',
		method: 'post',
		data,
	});
}

/**
 * @description 添加客服
 * @param
 * @returns
 */
export async function chatAdd(data) {
	return request({
		url: '/supplier/chat.chat/add',
		method: 'post',
		data,
	});
}

/**
 * @description 客服详情
 * @param
 * @returns
 */
export async function tochatedit(data) {
	return request({
		url: '/supplier/chat.chat/edit',
		method: 'get',
		data,
	});
}

/**
 * @description 编辑客服
 * @param
 * @returns
 */
export async function chatedit(data) {
	return request({
		url: '/supplier/chat.chat/edit',
		method: 'post',
		data,
	});
}

/**
 * @description 编辑客服
 * @param
 * @returns
 */
export async function chatdelete(data) {
	return request({
		url: '/supplier/chat.chat/delete',
		method: 'post',
		data,
	});
}

/**
 * @description 聊天记录
 * @param
 * @returns
 */
export async function chatList(data) {
	return request({
		url: '/supplier/chat.chat/list',
		method: 'post',
		data,
	});
}

/**
 * @description 对话记录
 * @param
 * @returns
 */
export async function chatRecord(data) {
	return request({
		url: '/supplier/chat.chat/record',
		method: 'post',
		data,
	});
}

/**
 * @description 工作台
 * @param
 * @returns
 */
export async function workbench(data) {
	return request({
		url: '/supplier/chat.chat/workbench',
		method: 'post',
		data,
	});
}

/**
 * @description 设置客服状态
 * @param
 * @returns
 */
export async function editStatus(data) {
	return request({
		url: '/supplier/chat.chat/set',
		method: 'post',
		data,
	});
}
